<template>
    <div>
        <template v-if="action == 'table' " style="width: 75px;">
            <div v-if="value">
                <i class="el-icon-date"></i><span>{{value.substring(2, 10)}}</span>
            </div>
            <div v-if="value">
                <i class="el-icon-time"></i><span>{{value.substring(11)}}</span>
            </div>
        </template>
        <template v-if="action == 'edit' ">
            <el-date-picker
                    :value="value"
                    type="datetime"
                    v-on="$listeners"
                    value-format="yyyy-MM-dd HH:mm:ss"
                    placeholder="选择日期时间">
            </el-date-picker>
        </template>
        <template v-if="action == 'search'">
            <el-date-picker
                    style="width:100%;"
                    :value="value"
                    v-on="$listeners"
                    type="datetimerange"
                    :default-time="['00:00:00']"
                    value-format="yyyy-MM-dd HH:MM:ss"
                    :start-placeholder="fieldName + '开始'"
                    :end-placeholder="fieldName + '结束'">
            </el-date-picker>
        </template>

    </div>
</template>
<script>
    import base from './base.js';
    export default {
        extends: base,
        props: {},
        data() {
            return {
                searchModel: 'range'

            }
        },
    }
</script>
<style>
</style>
